home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / online / fidonetts / fts-0006.002 < prev    next >
Text File  |  1991-11-30  |  40KB  |  850 lines

  1. Document: FTS-0006
  2. Version:  002
  3. Date:     30-Nov-1991
  4.  
  5.  
  6.  
  7.  
  8.                             YOOHOO and YOOHOO/2U2
  9.  
  10.                     The netmail handshake used by Opus-CBCS
  11.              and other intelligent Fidonet mail handling packages
  12.  
  13.  
  14.                               Vince Perriello
  15.                              FidoNet 1:2343/491
  16.  
  17.  
  18.  
  19.  
  20. Status of this document:
  21.  
  22.      This FTS (FidoNet(r) Technical Standard) specifies an optional
  23.      standard for the FidoNet community.  Implementation of the
  24.      protocols defined in this document is not mandatory,  but all
  25.      implementations of these protocols are expected to adhere to this
  26.      standard.  Distribution of this document is subject to the 
  27.      restrictions listed below.
  28.  
  29.      Fido and FidoNet are registered marks of Tom Jennings and Fido
  30.      Software
  31.  
  32.  
  33.  
  34.  
  35. LEGAL STUFF
  36. -----------
  37.  
  38. The original  protocol and documentation are by Wynn Wagner III.  Updates
  39. have  been  made  to  this  document  by  Vince Perriello,  who  also  is
  40. responsible for most of the sample routine included with this document.
  41.  
  42. They are  released to the  public for  any use  whatsoever as long as you 
  43. don't  modify any  transmitted  structure  or try to  make money  hawking
  44. either the sample code or this document as if you owned them.
  45.  
  46. If you choose to use the  method  or  the  sample  routines,  you  do  so
  47. entirely at your own risk.  It  is  possible that the routines will cause
  48. physical damage to your equipment, an invasion of  fire ants, the plague,
  49. or an extended visit from in-laws.  If any  of  that  stuff  (or anything
  50. else) happens, you accept the consequences totally.
  51.  
  52.  
  53. CREDITS
  54. -------
  55.  
  56. Fido  and  Fidonet  are  registered  trademarks of Tom Jennings and  Fido
  57. Software.
  58.  
  59. ARCmail was originated by System Enhancement Associates.
  60.  
  61. The ZModem protocol was designed by Chuck Forsberg. The SEAlink / SEAlink
  62. Overdrive protocols are copyrighted by System Enhancment Associates.  The
  63. TeLink protocol was designed and first implemented by Tom Jennings.
  64.  
  65. The state charts in this document were done by Vince Perriello.
  66.  
  67. Rick Huebner designed  and  implemented  the  basic  WaZOO  file  request
  68. method.  Update  request functionality was added by Vince Perriello.  Bob
  69. Hartman is responsible for the addition of Domain support.
  70.  
  71. FTS-0001, describing the base FidoNet protocol, was created by Randy Bush.
  72.  
  73. FTS-0007, describing enhancement to FTS-0001 using SEAlink and/or SEAlink
  74. Overdrive, was created by Phil Becker.
  75.  
  76. YooHoo and YooHoo/2u2                                              Page 2
  77. Overview
  78.  
  79.  
  80.  
  81. UPFRONT
  82. -------
  83.  
  84. YOOHOO and YOOHOO/2U2 are  the  initial  handshakes  for the WaZOO e-mail
  85. protocol.  They are designed to let two systems establish a common ground
  86. for a netmail session while making  sure  that non-WaZOO software doesn't
  87. get upset by material it can't understand.
  88.  
  89. The YOOHOO procedure begins as a single  byte  (0xf1).   If the system on
  90. the other end doesn't reply to that byte,  no  further  YOOHOO  or  WaZOO
  91. transmissions are attempted.  To a non-WaZOO netmail system,  the  YOOHOO
  92. byte will simply seem like a byte of debris.
  93.  
  94. The  calling  system  initiates  the  YOOHOO  by  sending  the  attention
  95. character.   If the receiving system seems interested, the calling system
  96. sends a  128  byte packet containing such information as system and sysop
  97. names as well as a "capability mask." A 16-bit CRC protects the integrity
  98. of the 128-byte packet.
  99.  
  100. In response, the receiving  system  prepares  a  128  byte packet to send
  101. back.  This is the YOOHOO/2U2 procedure.
  102.  
  103.  
  104. FEATURES
  105. --------
  106.  
  107. The features of YOOHOO and YOOHOO/2U2 include
  108.  
  109.       * non-interference with systems that don't understand the
  110.         handshake
  111.  
  112.       * almost foolproof method for identifying a remote system
  113.         and establishing a common ground for transmission
  114.  
  115.       * built-in room to expand the capabilities of WaZOO without
  116.         having to resort to a kludge
  117.  
  118.  
  119. USAGE
  120. -----
  121.  
  122. A calling system simply uses  a  routine  that  transmits both YooHoo and
  123. TSYNC  handshake initiating characters to the  called  system.    If  the
  124. called system responds with an XMODEM 'NAK',  an FTS-0001 session will be
  125. initiated.  If an 'ENQ' is received, the  `YooHoo_Sender()'  routine will
  126. be invoked to handle the session negotiation.
  127.  
  128. A  receiving  system  can call a routine like `YooHoo_Receiver()'  if  it
  129. detects the YOOHOO character, or just drop into the FTS-0001  logic if it
  130. sees a TSYNC.
  131.  
  132. This simple method allows a mailer to take care of both the TSYNC and the
  133. YOOHOO handshakes.
  134.  
  135. YooHoo and YooHoo/2u2                                              Page 3
  136. WaZOO Protocols
  137.  
  138.  
  139.  
  140. PROTOCOLS
  141. ---------
  142.  
  143. Currently there are four WaZOO methods in use:
  144.  
  145. 1. ZedZap 
  146.    ------
  147.  
  148.         a Zmodem variant. The originator does a batch send then goes into a
  149.         receive batch mode.  The called system does receive then send. In 
  150.         the event of a file request (see description below) made by the 
  151.         called system, one more turnaround is made to service the request.
  152.  
  153.       * Unlike the "True" Zmodem protocol described by Chuck Forsberg, 
  154.         ZedZap routines must be able to handle a batch mode that has no 
  155.         actual files. In other words, it is possible for there to be a 
  156.         init sequence followed immediately by a ZFIN.
  157.  
  158.       * The maximum packet size is 8192. This is usually varied based on 
  159.         the baud rate. For example, at 2400 it might be 2048 bytes, then 
  160.         for 9600 baud and above the maximum of 8192 could apply. Note that
  161.         THIS IS A SIGNIFICANT VARIATION FROM STRICT ZMODEM IMPLEMENTATION.
  162.         (There's another WaZOO capability bit for those systems which 
  163.         can not handle this block size)
  164.  
  165.       * Netmail packets are transmitted as files with names in the form
  166.         "12345678.PKT". Because of this, multiple packets may be sent in 
  167.         a single session.
  168.  
  169.       * If the calling system transmits a .REQ file for file requests, the
  170.         receiving system can respond to it.  See "WaZOO File Requests" 
  171.         (below) for information on the .REQ file.
  172.  
  173. 2. ZedZip
  174.    ------
  175.  
  176.         This capability is identical to ZedZap, but does not use buffers
  177.         greater than 1K in size (like "True" Zmodem). It is also 
  178.         permissible to send a "null" packet in a ZedZip session. This
  179.         allows a system which must use a strict Zmodem implementation to
  180.         participate in a WaZOO session using Zmodem.
  181.  
  182.  
  183. 3. DietIFNA
  184.    --------
  185.  
  186.         The session operates like FTS-0001/FTS-0007. The notable exceptions 
  187.         are as follows:
  188.  
  189.       * The same packet naming convention as ZedZap applies, allowing more
  190.         than one packet to be transmitted in a single session.
  191.  
  192. YooHoo and YooHoo/2u2                                              Page 4
  193. WaZOO Protocols
  194.  
  195.  
  196.  
  197.       * Telink file transfers don't even attempt to exchange file names
  198.         using modem7. The receiving system extracts the file name from the 
  199.         Telink or SEAlink header block.
  200.  
  201.       * If SEAlink is used, run-ahead (the number of blocks to slide) is 
  202.         based on the baud rate:  BlocksToSlide = BaudRate / 400, up to a 
  203.         max of 24 blocks.
  204.  
  205.       * When there is nothing to send, a system should remain quiet.  In 
  206.         other words, the end of a session can be determined by a timeout.
  207.  
  208.       * Under no circumstances should "BARK" file request logic be active
  209.         during a DietIFNA session. File requests, if any, should be 
  210.         transmitted using a .REQ file.
  211.  
  212.  
  213.         Many implementations of DietIfna have been accomplished by the mere
  214.         exchange of packets, followed by straight FTS-0001/0007 code. This
  215.         is incorrect but probably not easily remedied at this point. We have
  216.         made an effort to document this change in "reality" in this revision
  217.         of the document.
  218.  
  219. 4. Janus
  220.    -----
  221.  
  222.         Janus is a full-duplex simultaneous bidirectional file transfer
  223.         protocol. In other words, it can send and receive files at the same
  224.         time.  It's very loosely derived from ZModem and HDLC/X.25 protocol
  225.         technology, in that it uses variable length data-typed packets, and
  226.         that transmission of file data does not require ACKs.
  227.  
  228.         The protocol is documented elsewhere; it is beyond the scope of this
  229.         document to do so.
  230.  
  231. YooHoo and YooHoo/2u2                                              Page 5
  232. Choosing WaZOO Methods
  233.  
  234.  
  235.  
  236. How to decide which WaZOO method to use
  237. ---------------------------------------
  238.  
  239.  
  240. Since the called system has all the information  necessary to decide what
  241. WaZOO method to employ,  the best way to implement the process is for the
  242. calling  system  to send,  in its  capability  mask,  all the  bits which
  243. correspond to methods it can use (or wants to use)  in communicating with
  244. the called system.  The called  system then looks at these bits and sends
  245. back only the bit which corresponds to the method it wants to use.
  246.  
  247. If the  called system  sends  back a mask  which contains  more  than one
  248. capability of the  calling system,  it can create a  problem situation if
  249. one system  arrives at its choice of methods  differently from the other.
  250. Thus, when the called system doesn't make the choice, both systems should
  251. choose as follows:
  252.  
  253. 1. Janus
  254.  
  255. 2. ZedZap
  256.  
  257. 3. ZedZip
  258.  
  259. 4. DietIFNA
  260.  
  261. The capability highest on the list which both systems indicate ability to
  262. execute should be the one employed.
  263.  
  264. YooHoo and YooHoo/2u2                                              Page 6
  265. WaZOO Filename conventions
  266.  
  267.  
  268.  
  269. WaZOO FILENAMES
  270. ---------------
  271.  
  272.  
  273. 1. MESSAGE PACKETS ... xxxxxxxx.PKT
  274.  
  275.         Normal (unarchived) messages are sent in a file name that has a tag 
  276.         of .PKT.  The "x" characters should be hex digits.
  277.  
  278.  
  279. 2. ARCmail ... xxxxxxxx.{MO|TU|WE|TH|FR|SA|SU}#
  280.  
  281.         Message packets are often shipped in an archive that has been
  282.         compressed with some LZ utility.
  283.  
  284.         The file name consists of a name with hex digits. The tag is one of
  285.         seven two-character prefixes ("MO", "TU", "WE", "TH", "FR", "SA" or
  286.         "SU") and a number (0-9).
  287.  
  288.         This particular naming convention was established by ARCmail version
  289.         0.60, which is a defacto standard in FidoNet.
  290.  
  291.  
  292. 3. FILE REQUESTS ... xxxxxxxx.REQ
  293.  
  294.         This is explained below.
  295.  
  296.         In a nutshell, the file name consists of the receiving system's 
  297.         Fidonet address expressed as two 4-digit hex numbers.  The file tag 
  298.         is .REQ.
  299.  
  300.         In a Janus session, the .REQ file isn't actually sent. Janus has
  301.         a transaction system which sends the .REQ file one line at a time
  302.         and then accepts the file(s) which the request generates.
  303.  
  304. YooHoo and YooHoo/2u2                                              Page 7
  305. Flow of a ZedZap or ZedZip Session
  306.  
  307.  
  308.  
  309. FLOW OF A ZEDZAP OR ZEDZIP SESSION
  310. ----------------------------------
  311.  
  312.  
  313.  
  314. The calling system:
  315.  
  316.  
  317.       * Send YooHoo
  318.  
  319.       * Receive YooHoo/2u2
  320.  
  321.       * In a single batch, send bundles, files, file request (.REQ) files 
  322.         (in that order)
  323.  
  324.       * In a single batch, receive bundles, files, file requests, and 
  325.         requested files (in that order)
  326.  
  327.       * If a file request (.REQ) file came in, send all requested files 
  328.         in a single batch.
  329.  
  330.  
  331. Receiving system:
  332.  
  333.       * Receive YooHoo
  334.  
  335.       * Send YooHoo/2u2
  336.  
  337.       * In a single batch, receive bundles, files, file requests
  338.  
  339.       * In a single batch, send bundles, files, our file requests, and 
  340.         respond to file requests that arrived from the remote system.
  341.  
  342.       * If we sent a .REQ file in the preceding step, receive all files 
  343.         in a single batch.
  344.  
  345.  
  346. YooHoo and YooHoo/2u2                                              Page 8
  347. WaZOO File Requests
  348.  
  349.  
  350.  
  351. WAZOO FILE REQUESTS
  352. -------------------
  353.  
  354. Rick Huebner, who adapted the ZModem routines for Opus, and the architect of
  355. the Janus file transfer protocol, designed the ".REQ file"-based file request
  356. system.
  357.  
  358.  
  359. REQ FILE:
  360.  
  361. A WaZOO file request is based on a request file.  The name of a request file
  362. is similar to the .OUT and .FLO files used by Opus-CBCS and similar mail
  363. products (such as BinkleyTerm).
  364.  
  365.          TEMPLATE: netnode.REQ
  366.  
  367.          EXAMPLE:  00010002.REQ   ... a request being sent to 1/2
  368.  
  369. The .REQ file is simply a text file that contains the files we want from the
  370. remote system. Those file names can include wildcards, but should not contain
  371. a path. Optionally, there can be a password if the sending system requires one.
  372.  
  373. The "netnode" part of the file name is built from the remote systems net and
  374. node numbers.  Both numbers become 4-character hex numbers in the file name.
  375.  
  376. Let's say we're requesting THIS.ARC and all node lists from 12/2.  The file
  377. name would be 000C0002.REQ.  The contents would look like this:
  378.  
  379.                   this.arc
  380.                   nodelist.*
  381.  
  382. If the sysop of 12/2 requires a password of THAT to get the file THIS.ARC, the
  383. REQ file contents would have to change:
  384.  
  385.                   this.arc !that
  386.                   nodelist.*
  387.  
  388. Transaction-level passwords (of 6 or fewer characters) follow the file name:
  389.  
  390.                   <filename><single-space-character>!<password><cr>
  391.  
  392. YooHoo and YooHoo/2u2                                              Page 9
  393. WaZOO File Requests
  394.  
  395.  
  396.  
  397.  
  398. If the request is of the "update" genre, the type of update and the time,
  399. expressed as a UNIX-style long decimal ASCII number, follows the name, or in
  400. the event that there is a transaction-level password, the password. For
  401. example, an update request for file NEWOPUS.*, where you already have a file
  402. dated 1-January 1989, 00:00 and you live on the East Coast (GMT+06) would be:
  403.  
  404.                   NEWOPUS.* +599634000
  405.  
  406. The sign is required, it indicates the type of update request. A '+' means
  407. that all files matching the filespec "NEWOPUS.*" newer than the shown time
  408. will be sent, a '-' means that all matching files with dates up to and
  409. including the indicated time will be sent.
  410.  
  411.  
  412. The complete format of an action line in an REQ file is, then:
  413.  
  414.           <filename>[<space>!<password>][<space><+/-><time>]<cr>
  415.  
  416.  
  417.  
  418. MECHANISM:
  419.  
  420. In a ZedZap or DietIfna session, the .REQ file is simply transmitted to the 
  421. other system.  It goes "as is" like any other file. In a Janus session, the
  422. .REQ file will be sent one line at a time and individually serviced by the
  423. other end.
  424.  
  425. The other system can ignore the request, send some of the files, or send all
  426. of the files.  There is no accounting or responsibilities on the part of the
  427. remote system.
  428.  
  429. If your implementation is unable to process the update information for any
  430. reason, then you should process the line as a "regular" file request.
  431.  
  432.  
  433.  
  434. NOTE:
  435.  
  436. In the YooHoo packet, there's a bit that lets you know if the remote system
  437. currently accepts .REQ files.  This will be a clue as to whether a .REQ file
  438. would be a waste of time or not. Procedurally, you just should not send a .REQ
  439. file to a system which indicates that it won't process it.
  440.  
  441. YooHoo and YooHoo/2u2                                              Page 10
  442. Structures and Definitions
  443.  
  444.  
  445.  
  446. STRUCTURES AND DECLARATIONS
  447. ---------------------------
  448.  
  449.  
  450. #define ACK    0x06
  451. #define NAK    0x15
  452. #define ENQ    0x05
  453. #define YOOHOO 0xf1
  454. #define TSYNC  0xae
  455.  
  456. struct   _Hello
  457.     {
  458.     word     signal;           /* always 'o'     (0x6f)                   */
  459.     word     hello_version;    /* currently 1    (0x01)                   */
  460.     word     product;          /* product code                            */
  461.     word     product_maj;      /* major revision of the product           */
  462.     word     product_min;      /* minor revision of the product           */
  463.     char     my_name[60];      /* Other end's name, will include domain   */
  464.                                /* if DO_DOMAIN is set in capabilities mask*/
  465.     char     sysop[20];        /* sysop's name                            */
  466.     word     my_zone;          /* 0== not supported                       */
  467.     word     my_net;           /* out primary net number                  */
  468.     word     my_node;          /* our primary node number                 */
  469.     word     my_point;         /* 0 == not supported                      */
  470.     byte     my_password[8];   /* This is not necessarily null-terminated */
  471.     byte     reserved2[8];     /* reserved by Opus                        */
  472.     word     capabilities;     /* see below                               */
  473.     byte     reserved3[12];    /* for non-Opus systems with "approval"    */
  474.     };                         /*          total size 128 bytes           */
  475.  
  476.  
  477.  
  478. /*------------------------------------------------------------------------*/
  479. /* YOOHOO<tm> CAPABILITY VALUES                                           */
  480. /*------------------------------------------------------------------------*/
  481. #define Y_DIETIFNA 0x0001  /* Can do fast "FTS-0001"  0000 0000 0000 0001 */
  482. #define FTB_USER   0x0002  /* Reserved by Opus-CBCS   0000 0000 0000 0010 */
  483. #define ZED_ZIPPER 0x0004  /* Does ZModem, 1K blocks  0000 0000 0000 0100 */
  484. #define ZED_ZAPPER 0x0008  /* Can do ZModem variant   0000 0000 0000 1000 */
  485. #define DOES_IANUS 0x0010  /* Can do Janus            0000 0000 0001 0000 */
  486. #define Bit_5      0x0020  /* reserved by FTSC        0000 0000 0010 0000 */
  487. #define Bit_6      0x0040  /* reserved by FTSC        0000 0000 0100 0000 */
  488. #define Bit_7      0x0080  /* reserved by FTSC        0000 0000 1000 0000 */
  489. #define Bit_8      0x0100  /* reserved by FTSC        0000 0001 0000 0000 */
  490. #define Bit_9      0x0200  /* reserved by FTSC        0000 0010 0000 0000 */
  491. #define Bit_a      0x0400  /* reserved by FTSC        0000 0100 0000 0000 */
  492. #define Bit_b      0x0800  /* reserved by FTSC        0000 1000 0000 0000 */
  493. #define Bit_c      0x1000  /* reserved by FTSC        0001 0000 0000 0000 */
  494. #define Bit_d      0x2000  /* reserved by FTSC        0010 0000 0000 0000 */
  495. #define DO_DOMAIN  0x4000  /* Packet contains domain  0100 0000 0000 0000 */
  496. #define WZ_FREQ    0x8000  /* WZ file req. ok         1000 0000 0000 0000 */
  497.  
  498. YooHoo and YooHoo/2u2                                              Page 11
  499. Domain addressing in Hello Packet
  500.  
  501.  
  502. Since the invention of the WaZOO handshake, nearly every change in the
  503. FidoNet transport has been accessible by defining bits for new protocols,
  504. using the point number field in the structure, etc.
  505.  
  506. With the advent of Domain addressing in FidoNet, this was no longer the
  507. case. There was no place set aside in the hello packet where domain info
  508. could be passed from one system to another.
  509.  
  510. We have addressed this requirement by using some of the space set aside
  511. in the system name field for the domain. It is backward-compatible with
  512. all systems which determine the end of a string by use of a null.
  513.  
  514. WaZOO systems that support domains communicate that fact by setting the
  515. DO_DOMAIN bit (hex 2000) in the capabilities mask. This tells the other
  516. side that they can expect to find a domain address in the packet.
  517.  
  518. The domain name is stored at the end of the 'my_name' field. It is stored
  519. in its entirety (no abbreviations as in FSC-0045) after the system name.
  520. If the length of the system name plus the null terminator plus the length
  521. of the domain name plus terminator exceeds 60, the system name will be
  522. truncated (right to left) to make it fit.
  523.  
  524. So, for a system named "FUBAR" at address 1:234/567@fidonet.org, the
  525. address and name fields in the header would look like this:
  526.  
  527. hello.my_zone  = 1
  528. hello.my_net   = 234
  529. hello.my_node  = 567
  530. hello.my_point = 0
  531. hello.my_name  = 'F','U','B','A','R', 0, 'f','i','d','o','n','e','t',
  532.                  '.','o','r','g',0
  533. hello.capabilities will contain the usual capabilities plus DO_DOMAIN.
  534.  
  535. A remote system receiving this packet should look past the null in
  536. my_name to get the domain name.
  537.  
  538. YooHoo and YooHoo/2u2                                              Page 12
  539. Caller State Tables
  540.  
  541.  
  542.  
  543. Calling System:
  544.  
  545.  
  546. The parts of FTS-0001 and FTS-0007 which deal with synchronization of calling
  547. and called system must be modified to deal with the reception and processing
  548. of the YooHoo character and exchange of Hello packets. The following state
  549. table may be used to initiate an FTS-0001 or a WaZOO session by the calling
  550. system.  It replaces state S3 in the FTS-0001 table.
  551.  
  552.  
  553.  
  554.  .-----+----------+-------------------------+-------------------------+-----.
  555.  |State| State    | Predicate(s)            | Action(s)               | Next|
  556.  |  #  | Name     |                         |                         | Stat|
  557.  |-----+----------+-------------------------+-------------------------+-----|
  558.  | SS0 | SyncInit |                         | Prepare 3 sec Sync timer|     |
  559.  |     |          |                         | Prepare .5 sec NAK tmr  |     |
  560.  |     |          |                         | Init NAK Count          |     |
  561.  |     |          |                         | Start 60 sec master tmr | SS1 |
  562.  |-----+----------+-------------------------+-------------------------+-----|
  563.  | SS1 | SendSync | 1. Over 60 seconds      |                         |     |
  564.  |     |          |    or carrier lost      | no response             | exit|
  565.  |     |          +-------------------------+-------------------------+-----|
  566.  |     |          | 2. 3 sec elapsed        | Clear Inbound buffer    |     |
  567.  |     |          |    or timer not started | Send YOOHOO, then TSYNC |     |
  568.  |     |          |                         | Start 3 sec Sync timer  | SS2 |
  569.  |     |          +-------------------------+-------------------------+-----|
  570.  |     |          | 3. not elapsed          |                         | SS2 |
  571.  |-----+----------+-------------------------+-------------------------+-----|
  572.  | SS2 | WaitResp | 1. Nothing received     | require a response      | SS1 |
  573.  |     |          +-------------------------+-------------------------+-----|
  574.  |     |          | 2. ENQ received         | WaZOO Protocol selected | exit|
  575.  |     |          +-------------------------+-------------------------+-----|
  576.  |     |          | 3. 'C' received         | probable FTS-0001       | SS3 |
  577.  |     |          +-------------------------+-------------------------+-----|
  578.  |     |          | 4. NAK received         | probable FTS-0001       | SS3 |
  579.  |     |          +-------------------------+-------------------------+-----|
  580.  |     |          | 5. Debris (might include| Reset NAK timer         |     |
  581.  |     |          |    (YOOHOO|TSYNC) & 127)| if started              | SS1 |
  582.  |-----+----------+-------------------------+-------------------------+-----|
  583.  | SS3 | NAKTmr   | 1. Timer not expired    | Zero NAK count          |     |
  584.  |     |          |    or timer not started | Start .5 sec NAK timer  | SS1 |
  585.  |     |          +-------------------------+-------------------------+-----|
  586.  |     |          | 2. Timer expired        | Bump NAK count          | SS4 |
  587.  |-----+----------+-------------------------+-------------------------+-----|
  588.  | SS4 | NAKCount | 1. Count >= 2?          | assume FTS-0001         | exit|
  589.  |     |          +-------------------------+-------------------------+-----|
  590.  |     |          | 2. Count < 2            | Keep looking            | SS1 |
  591.  `-----+----------+-------------------------+-------------------------+-----'
  592.  
  593. YooHoo and YooHoo/2u2                                              Page 13
  594. Caller State Tables
  595.  
  596.  
  597. Calling System (continued):
  598.  
  599.  
  600.  
  601. The FTS-0001 exits from the above table should operate using the FTS-0001 
  602. state tables, starting at state S4. The "WaZOO detected" case should proceed 
  603. using the following state table:
  604.  
  605.  
  606.  
  607.  .-----+----------+-------------------------+-------------------------+-----.
  608.  |State| State    | Predicate(s)            | Action(s)               | Next|
  609.  |  #  | Name     |                         |                         | Stat|
  610.  |-----+----------+-------------------------+-------------------------+-----|
  611.  | YS1 | SndHello | Successful              | Looks like WaZOO        | YS2 |
  612.  |     | (state   +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  613.  |     |  SH1)    | Not successful          | Repeat whole thing      | exit|
  614.  |-----+----------+-------------------------+-------------------------+-----|
  615.  | YS2 | WaitResp | 30 sec timer expires    | repeat whole thing      | exit|
  616.  |     |          | or lost carrier         |                         |     |
  617.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  618.  |     |          | Received YOOHOO         | Another WaZOO, go       | YS3 |
  619.  |     |          |                         | process receive         |     |
  620.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  621.  |     |          | Received debris         | Repeat whole thing      | YS2 |
  622.  |-----+----------+-------------------------+-------------------------+-----|
  623.  | YS3 | GetHello | Information             | Report Success          | exit|
  624.  |     | (state   | Successfully            |                         |     |
  625.  |     |  RH1)    | Exchanged               |                         |     |
  626.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  627.  |     |          | Failure                 | Repeat whole thing      | exit|
  628.  `-----+----------+-------------------------+-------------------------+-----'
  629.  
  630.  
  631.  
  632. The failure cases in this table may be retried. The retry should be from 
  633. the point of synchronization. This means redoing the process in the SendSync
  634. table on Page 11. A really smart mailer could therefore do a YooHoo, exchange
  635. information, decide that it doesn't want to do WaZOO, fail out, and attempt 
  636. an FTS-0001 session.
  637.  
  638.  
  639. If the packet exchange is successful, session method selection proceeds and
  640. then the chosen session method should be employed to exchange mail and files.
  641.  
  642. YooHoo and YooHoo/2u2                                              Page 14
  643. Called System State Tables
  644.  
  645.  
  646.  
  647. The following state table may be used to initiate an FTS-0001 or a WaZOO
  648. session by the called system.  It replaces states R1 and R2 in the FTS-0001
  649. table.
  650.  
  651.  
  652.  .-----+----------+-------------------------+-------------------------+-----.
  653.  |State| State    | Predicate(s)            | Action(s)               | Next|
  654.  |  #  | Name     |                         |                         | Stat|
  655.  |-----+----------+-------------------------+-------------------------+-----|
  656.  | RS0 | SyncInit |                         | Start 5 second idle tmr | RS1 |
  657.  |-----+----------+-------------------------+-------------------------+-----|
  658.  | RS1 | IdleWait | 1. 5 sec tmr expired    | Take the initiative     | RS2 |
  659.  |     |          +-------------------------+-------------------------+-----|
  660.  |     |          | 2. Carrier lost         | Session aborted         | exit|
  661.  |     |          +-------------------------+-------------------------+-----|
  662.  |     |          | 3. Peek = YOOHOO        | Looks like a live WaZOO | RS3 |
  663.  |     |          +-------------------------+-------------------------+-----|
  664.  |     |          | 4. Peek = TSYNC         | Live FTS-0001, we think | RS3 |
  665.  |     |          +-------------------------+-------------------------+-----|
  666.  |     |          | 5. Peek = CR, LF, space | He looks alive          | RS2 |
  667.  |     |          +-------------------------+-------------------------+-----|
  668.  |     |          | 6. Other character      | Eat it                  | RS1 |
  669.  |-----+----------+-------------------------+-------------------------+-----|
  670.  | RS2 |SendBanner| 1. Error returned       | Session aborted         | exit|
  671.  |     |          +-------------------------+-------------------------+-----|
  672.  |     |          | 2. Banner sent OK       |                         | RS3 |
  673.  |-----+----------+-------------------------+-------------------------+-----|
  674.  | RS3 |RecvInit  |                         | Start 20 sec timer      | RS4 |
  675.  |     |          |                         | Init 10 sec timer       |     |
  676.  |-----+----------+-------------------------+-------------------------+-----|
  677.  | RS4 |SendSync  | 1. Error returned       | Session aborted         | exit|
  678.  |     |(xmit sync+-------------------------+-------------------------+-----|
  679.  |     |string)   | 2. String sent OK       | Watch for sender sync   | RS5 |
  680.  |-----+----------+-------------------------+-------------------------+-----|
  681.  | RS5 | WaitSync | 1. Carrier lost         | Session aborted         | exit|
  682.  |     |          +-------------------------+-------------------------+-----|
  683.  |     |          | 2. YOOHOO received      | WaZOO session selected  | exit|
  684.  |     |          +-------------------------+-------------------------+-----|
  685.  |     |          | 3. TSYNC received       | probable FTS-0001       | RS6 |
  686.  |     |          +-------------------------+-------------------------+-----|
  687.  |     |          | 4. CR received          | Still sync'ing          | RS4 |
  688.  |     |          +-------------------------+-------------------------+-----|
  689.  |     |          | 5. Other character rcvd | Get next input character| RS5 |
  690.  |     |          +-------------------------+-------------------------+-----|
  691.  |     |          | 6. 10 sec timer elapsed | FTS-0001 selected       | exit|
  692.  |     |          +-------------------------+-------------------------+-----|
  693.  |     |          | 7. 20 sec timer elapsed | Not a mail session      | exit|
  694.  |-----+----------+-------------------------+-------------------------+-----|
  695.  | RS6 | TsyncTmr | 1. Timer not running    | Start 10 second timer   | RS5 |
  696.  |     |          |                         | Reset 20 sec timer      |     |
  697.  |     |          +-------------------------+-------------------------+-----|
  698.  |     |          | 2. Timer running        | Two TSYNCS = FTS-0001   | exit|
  699.  `-----+----------+-------------------------+-------------------------+-----'
  700.  
  701. YooHoo and YooHoo/2u2                                              Page 15
  702. Called System State Tables
  703.  
  704.  
  705.  
  706. The FTS-0001 exits from the above table should operate using the FTS-0001 
  707. state tables, starting at state R3. The "WaZOO detected" case should proceed
  708. using the following state table:
  709.  
  710.  
  711.  
  712.  .-----+----------+-------------------------+-------------------------+-----.
  713.  |State| State    | Predicate(s)            | Action(s)               | Next|
  714.  |  #  | Name     |                         |                         | Stat|
  715.  |-----+----------+-------------------------+-------------------------+-----|
  716.  | YR1 | GetHello | Information             | Start 20 sec timer      | YR2 |
  717.  |     | (state   | Successfully            | Initialize retry count  |     |
  718.  |     |  RH1)    | Exchanged               | Send YooHoo             |     |
  719.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  720.  |     |          | Failure                 | Repeat whole thing      | exit|
  721.  |-----+----------+-------------------------+-------------------------+-----|
  722.  | YR2 | WaitResp | 20 sec timeout          | try again               | YR3 |
  723.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  724.  |     |          | Lost carrier            | Failure                 | exit|
  725.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  726.  |     |          | Received ENQ            | Go send hello           | YR4 |
  727.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  728.  |     |          | Received debris         | Keep looking            | YR2 |
  729.  |-----+----------+-------------------------+-------------------------+-----|
  730.  | YR3 | PollPeer | More than 3 retries     | Give it up              | exit|
  731.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  732.  |     |          | Less than 3 retries     | Bump retry count        | YR2 |
  733.  |     |          |                         | Clear input buffer      |     |
  734.  |     |          |                         | Send YOOHOO             |     |
  735.  |     |          |                         | Restart 20 sec timer    |     |
  736.  |-----+----------+-------------------------+-------------------------+-----|
  737.  | YR4 | SndHello | Successful              | All done, report success| exit|
  738.  |     | (state   +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  739.  |     |  SH1)    | Not successful          | Repeat whole thing      | exit|
  740.  `-----+----------+-------------------------+-------------------------+-----'
  741.  
  742.  
  743.  
  744. The failure cases in states YR1, YR3 and YR4 of this table may be retried. 
  745. The retry should be from the point of synchronization. This means redoing the
  746. process in the RecvSync table on Page 13, beginning at state RS3. A really
  747. smart mailer could therefore do a YooHoo, exchange information, decide that 
  748. it doesn't want to (or cannot) do a WaZOO session, fail out, and attempt 
  749. an FTS-0001 session.
  750.  
  751.  
  752. If the packet exchange is successful, session method selection proceeds and
  753. then the chosen session method should be employed to exchange mail and files.
  754.  
  755. YooHoo and YooHoo/2u2                                              Page 16
  756. Packet Exchange State Tables
  757.  
  758.  
  759.  
  760. The following state table describes the transmission of the "Hello" packet 
  761. from one system to its partner:
  762.  
  763.  
  764.  
  765.  .-----+----------+-------------------------+-------------------------+-----.
  766.  |State| State    | Predicate(s)            | Action(s)               | Next|
  767.  |  #  | Name     |                         |                         | Stat|
  768.  |-----+----------+-------------------------+-------------------------+-----|
  769.  | SH1 | InitSend |                         | Disable XON/XOFF        | SH2 |
  770.  |     |          |                         | Set retry count to 0    |     |
  771.  |-----+----------+-------------------------+-------------------------+-----|
  772.  | SH2 | SendHedr |                         | Send Hex 1f, then       | SH3 |
  773.  |     |          |                         | Send HELLO struct       |     |
  774.  |-----+----------+-------------------------+-------------------------+-----|
  775.  | SH3 | SendCRC  |                         | Clear Input Buffer      | SH4 |
  776.  |     |          |                         | Send two-byte CRC of pkt|     |
  777.  |     |          |                         | MSB followed by LSB     |     |
  778.  |     |          |                         | Start 40 second timer   |     |
  779.  |-----+----------+-------------------------+-------------------------+-----|
  780.  | SH4 | GetResp  | 40 second timer expires | Failed to send packet   | exit|
  781.  |     |          | or carrier lost         |                         |     |
  782.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  783.  |     |          | ACK received            | Successful transmission | exit|
  784.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  785.  |     |          | '?' received            | Error, try retransmit   | SH2 |
  786.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  787.  |     |          | ENQ received            | Out of sync?            | SH2 |
  788.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  789.  |     |          | other character recvd   | Debris, keep watching   | SH4 |
  790.  `-----+----------+-------------------------+-------------------------+-----'
  791.  
  792. YooHoo and YooHoo/2u2                                              Page 17
  793. Packet Exchange State Tables
  794.  
  795.  
  796. The following state table describes the reception of the "Hello" packet sent
  797. to a system by its partner:
  798.  
  799.  .-----+----------+-------------------------+-------------------------+-----.
  800.  |State| State    | Predicate(s)            | Action(s)               | Next|
  801.  |  #  | Name     |                         |                         | Stat|
  802.  |-----+----------+-------------------------+-------------------------+-----|
  803.  | RH1 | SendENQ  |                         | Start 2 minute timer    | RH2 |
  804.  |     |          |                         | Send an ENQ character   |     |
  805.  |-----+----------+-------------------------+-------------------------+-----|
  806.  | RH2 | WaitHedr | 2 minute timer expires  | Report failure          | exit|
  807.  |     |          | or carrier lost         |                         |     |
  808.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  809.  |     |          | Received Hex 1f         | Got header, get packet  | RH5 |
  810.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  811.  |     |          | Received other char     | Debris, throw away      | RH3 |
  812.  |     |          |                         | Start 10 sec timer      |     |
  813.  |-----+----------+-------------------------+-------------------------+-----|
  814.  | RH3 | TossJunk | 10 sec timer expires    | Too much noise          | RH4 |
  815.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  816.  |     |          | Received Hex 1f         | Got header, get packet  | RH5 |
  817.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  818.  |     |          | Input buffer empty      | Try to resynch          | RH4 |
  819.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  820.  |     |          | Carrier lost            | Report failure          | exit|
  821.  |-----+----------+-------------------------+-------------------------+-----|
  822.  | RH4 | ReSynch  |                         | Clear input buffer      | RH2 |
  823.  |     |          |                         | Send ENQ                |     |
  824.  |-----+----------+-------------------------+-------------------------+-----|
  825.  | RH5 | HdrSetup |                         | Initialize CRC          |     |
  826.  |     |          |                         | Set 30 second timer     | RH6 |
  827.  |-----+----------+-------------------------+-------------------------+-----|
  828.  | RH6 | GetHChar | 30 sec timer expires or |                         |     |
  829.  |     |          | carrier lost            | Report failure          | exit|
  830.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  831.  |     |          | Character received      | Process character       | RH7 |
  832.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  833.  |     |          | 10 seconds with no char | Error, try resync       | RH9 |
  834.  |-----+----------+-------------------------+-------------------------+-----|
  835.  | RH7 | StoHChar | Buffer and CRC filled   | Compare CRC             | RH8 |
  836.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  837.  |     |          | More characters needed  | Reset 30 sec timer      | RH6 |
  838.  |-----+----------+-------------------------+-------------------------+-----|
  839.  | RH8 | CheckCRC | CRC matches             | Finish Receive          | RH10|
  840.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  841.  |     |          | CRC doesn't match       | Handle error            | RH9 |
  842.  |-----+----------+-------------------------+-------------------------+-----|
  843.  | RH9 | CountERR | Less than 10 errors     | Send '?' (0x3f)         | RH2 |
  844.  |     |          +- - - - - - - - - - - - -+- - - - - - - - - - - - -+- - -|
  845.  |     |          | 10 errors               | Hang up, report failure | exit|
  846.  |-----+----------+-------------------------+-------------------------+-----|
  847.  | RH10| HelloOK  |                         | Clear inbound buffer    | exit|
  848.  |     |          |                         | Send ACK                |     |
  849.  `-----+----------+-------------------------+-------------------------+-----'
  850.